/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package banco_de_dados;

import java.sql.Connection;
import java.sql.DriverManager;
import javax.swing.JOptionPane;

public class ConnectionManager {
    
    public static Connection getConnection(){
    
    try{
        Class.forName("com.mysql.jdbc.Driver");
        
        return DriverManager.getConnection("jdbc:mysql://localhost:3306/mysql?zeroDateTimeBehavior=convertToNull", "root", "nene020983");
        
        
    }catch(Exception e){
        JOptionPane.showMessageDialog(null, "Não Conectou");
        return null;
    
    }
    
    }
    
}